package org.example.controller;

import org.example.entity.UserDept;
import org.example.models.R;
import org.example.service.UserDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 鸢一折纸
 * @Email: 3498881048@qq.com
 * @Date: 2025/09/04 9:03
 * @Description:
 **/

@RestController
@RequestMapping("/userDept")
public class UserDeptController {

    @Autowired
    private UserDeptService userDeptService;

    @GetMapping("/userMessage")
    public R<UserDept> getUserMessage(Integer userId) {
        return R.success(userDeptService.findUserInformation(userId));
    }

}
